<template>
  <div>
    <!-- <NavbarIndex></NavbarIndex> -->
    <compontent :is="template" :special="special"></compontent>
    <FooterFics></FooterFics>
  </div>
</template>

<script>
// import NavbarIndex from "@/components/NavbarIndex.vue"
import FooterFics from "@/components/FooterFics.vue"
import { mapState, mapActions } from "vuex"
import Vue from 'vue'
export default {
  name: "proseminarshow",
  components: {
    // NavbarIndex,
    FooterFics
  },
  data () {
    return {
      template: ''
    };
  },
  created () {
    this.setSpecial({ id: this.$route.params.id })
    // console.log(this.special)
    let temp = 'views/ProseminarShow_'
    if (this.special.index_template == 1) {
      temp += this.special.id + '.vue'
    } else {
      temp += 'default.vue'
    }
    this.loadcomponet(temp)
  },
  computed: {
    ...mapState('special', ['special'])
  },
  methods: {
    ...mapActions('special', ["setSpecial"]),
    loadcomponet (str) {
      Vue.component('temp', () => import('@/' + str))
      this.template = 'temp';
    },
  },
}
</script>